_txt = "";
_points = [];
_allHCs = entities "HeadlessClient_F";
_html = "<t color='#FF8c00' size='.7' shadow='0' align='left'>" + "排行榜:" + "</t><br/>";
{
	_points pushback [
		(getPlayerScores _x) select 5,
		name _x,
		_x getVariable ["FAR_count_revive",0],
		_x getVariable ["FAR_count_down", 0],
		_x getVariable ["as_money",0],
		_x getVariable ["as_play_time",0],
		_x getVariable ["as_win",0],
		_x getVariable ["as_kill",0]
		]
} forEach (call fn_getPlayerRed) - _allHCs;

_points sort false;

{
	_x params ["_kill", "_name", "_revive", "_down", "_money", "_time", "_win", "_hit"];
	_txt = _txt + format["%1: 杀%2 救%3 倒%4 钱%5 玩%6h 胜利次数%7 击中上校%8<br/>",
		_name,
		_kill,
		_revive,
		_down,
		_money,
		round(_time * 100) / 100,
		_win,
		_hit];
} forEach _points;

//最高记录
private _timeMost = missionNamespace getVariable["as_play_time", 0];

_txt = _txt + format["最高记录：<br/>%1杀%2<br/>%3救%4<br/>%5倒%6<br/>%7玩%8h<br/>%9胜利次数%10<br/>%11击中上校%12",
		missionNamespace getVariable["as_rank_kill_name", ""], missionNamespace getVariable["as_rank_kill", 0],
		missionNamespace getVariable["FAR_count_revive_name", ""], missionNamespace getVariable["FAR_count_revive", 0],
		missionNamespace getVariable["FAR_count_down_name", ""], missionNamespace getVariable["FAR_count_down", 0],
		missionNamespace getVariable["as_play_time_name", ""], round(_timeMost * 100) / 100,
		missionNamespace getVariable["as_win_name", ""], missionNamespace getVariable["as_win", 0],
		missionNamespace getVariable["as_kill_name", ""], missionNamespace getVariable["as_kill", 0]];



_html = _html + "<t color='#00FFFF' size='.6' shadow='0' shadowColor='#312100' align='left' >" + _txt +"<br/>" +"</t>"; 
[_html,-.22,.1,20,1,0,73932] spawn BIS_fnc_dynamicText;
